<template>
	<view class="popup" @touchmove.stop.prevent>
		<uni-popup ref="popup" type="center" :is-mask-click="false">
			<view class="header">
				<slot name="header"></slot>
			</view>
			<view class="content">
				<slot name="content"></slot>
			</view>
			<view class="footer">
				<slot name="footer"></slot>
			</view>
		</uni-popup>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';

	const popup = ref(null)
	
	// 开启弹框
	const open = () => {
		popup.value.open()
	}
	
	// 关闭弹框
	const close = () => {
		popup.value.close()
	}
	
	// 暴露方法
	defineExpose({
		open,
		close
	})
</script>

<style>
</style>